package cn.wolfcode.luowowo.comment.service;

import cn.wolfcode.luowowo.comment.domain.CommunityAnswer;
import cn.wolfcode.luowowo.comment.query.CommunityAnswerQueryObject;
import org.springframework.data.domain.Page;

import java.util.List;

public interface ICommunityAnswerService {

    /**
     * 添加某个社区提问的回答
     *
     * @param communityAnswer
     */
    void save(CommunityAnswer communityAnswer);

    /**
     * 分页查询提问下的回答
     *
     * @param qo
     * @return
     */
    Page queryPageForAnswer(CommunityAnswerQueryObject qo);


    /**
     * 查询某个社区提问的回答
     * @param id
     * @return
     */
    List<CommunityAnswer> findByDetailId(Long id);

    /**
     * 根据浏览次数获得第一个
     * @param id
     * @return
     */
    CommunityAnswer findTopByDetailId(Long id);

    /**
     * 查询某个回复
     * @param id
     * @return
     */
    CommunityAnswer selectById(String id);




}
